/*
 * @Author: 无聊 7989314+Hwz1997@user.noreply.gitee.com
 * @Date: 2025-07-01 11:37:30
 * @LastEditors: 无聊 7989314+Hwz1997@user.noreply.gitee.com
 * @LastEditTime: 2025-07-01 14:31:32
 * @FilePath: \keep_motion_api\models\index.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
const fs = require('fs');
const path = require('path');

const models = {};

// 自动加载所有模型
fs.readdirSync(__dirname)
  .filter(file => file !== 'index.js')
  .forEach(folder => {
    const modelPath = path.join(__dirname, folder, 'index.js');
    if (fs.existsSync(modelPath)) {
      const modelModule = require(modelPath);
      Object.assign(models, modelModule);
    }
  });
module.exports = models;